1. 12 May, 2019 5 commits
  2. 06 May, 2019 2 commits
  3. 18 Mar, 2019 1 commit
  4. 16 Mar, 2019 1 commit
  5. 06 Mar, 2019 1 commit
    • Tinu Weber's avatar
      lib/basedir: Add XDG_STATE_HOME · d28533bb
      Tinu Weber authored
      It's not part of the official XDG base directory specification, but
      folks have been asking for this for a (almost? over?) a decade. And
      we're not getting anywhere if developers don't actually start using it,
      so... here's my part in this.
      d28533bb
  6. 04 Mar, 2019 3 commits
  7. 26 Sep, 2018 7 commits
    • Tinu Weber's avatar
      Set errexit, noglob and nounset for *all* scripts · a5bfb03b
      Tinu Weber authored
      Very likely, some things might be broken now (I didn't check too
      thoroughly).
      
      errexit and nounset was already pretty common in most of the scripts;
      the ones that didn't have it set might complain at some point, but we'll
      see.
      
      noglob is necessary for any `for foo in $bar`-kind of loops that we
      don't want to accidentally expand values because it contains globbing.
      Where we know that we *want* globbing, we explicitly disable noglob
      locally. This is mostly crucial for zr, as it *expects* to loop over
      globs that we don't want to expand for local files.
      a5bfb03b
    • Tinu Weber's avatar
      Minor style improvements · 98ccaa97
      Tinu Weber authored
      Don't prefix string comparisons with `x` - unless there is an actually
      encountered situation where something breaks because it starts with a
      dash, and test/[ interprets it in unexpected ways, this is only Placebo.
      
      Also use proper quoting and escaping for string in pacwhy, and enclose
      `case` statement cases with a ( to the left as well.
      98ccaa97
    • Tinu Weber's avatar
      pacred: Use `comm` instead of `diff` · 17b1dc4e
      Tinu Weber authored
      It's simpler to invoke.
      
      Also, given that it's already part of coreutils (and this was the only
      place where we used `diff`), we get to drop the diffutils dependency
      (yay!).
      17b1dc4e
    • Tinu Weber's avatar
      zr: Add missing variable · 0df445dd
      Tinu Weber authored
      0df445dd
    • Tinu Weber's avatar
      zr: Check mapping when adding file · 4279a98d
      Tinu Weber authored
      zr add: Use mapping to determine target repository
      
      Each package is mapped to its repository, to check that (1) all packages
      are correctly mapped to a repository, and (2) all packages are mapped to
      the same repository.
      
      This makes the last argument (previously the repository name)
      superfluous, so it is removed.
      4279a98d
    • Tinu Weber's avatar
      zr: Add `map` command · 6044fb8e
      Tinu Weber authored
      Shows the repository mapping for a package.
      
      Currently, it reads a `mappings.ini` file in the zr configuration
      directory (XDG_CONFIG_HOME/zr), which uses the repository name (as used
      for other zr operations) as section header (surrounded by [ and ]), and
      a list of package matching patterns compatible with /bin/sh's `case`
      statements (as they will be used to match the package name in a case
      statement).
      
      This is more of a helper function to debug mapping files, but it's handy
      enough to keep around for further use.
      6044fb8e
    • Tinu Weber's avatar
      224a75f9
  8. 24 Sep, 2018 1 commit
    • Tinu Weber's avatar
      Makefile: Don't use prefix file name for target · 619b2779
      Tinu Weber authored
      It appears that merely *sourcing* a Makefile snippet is already enough
      to declare it a "dependency" of something, and if there is a matching
      target, it will be run. So even if we don't explicitly state
      ${PREFIXFILE} as a dependency (e.g. for the `install` target), it was
      regenerated nevertheless, leading to wrong content (as one usually does
      not set PREFIX et al for installing).
      619b2779
  9. 23 Sep, 2018 3 commits
  10. 18 Sep, 2018 8 commits
  11. 29 Aug, 2018 1 commit
  12. 23 Aug, 2018 2 commits
    • Tinu Weber's avatar
      repkg: Add provision for old package version/release · b588b1a0
      Tinu Weber authored
      This fixes issues caused by versioned dependencies.
      b588b1a0
    • Tinu Weber's avatar
      Revert "repkg: Add rudimentary support for "variables"" · 913a5f0b
      Tinu Weber authored
      This reverts commit 6d42a4cb.
      
      To properly support variables, I'd need a lexer/parser, which I am not
      interested in doing (at least not in shell). And simple pattern- or
      regex-based substitution can only go so far:
      
      * With simple glob-based pattern matching (as is done currently),
        escaping a variable would be heavy-handed (I would e.g. need to add a
        special variable like `${$}` to represent `$` in case one wants a
        literal *value* `${pkgname}`). With regex-based matching, I need to
        launch an external process (`sed`), which I am not willing to do for
        every single work in every single rule (as is currently done).
      
      * The way I currently resolve variables (looping through a list of
        variable names and substituting the associated variable expressions),
        `${pkgname}` might resolve (for some unholy reason) to a value
        `${pkgver}`, which would subsequently be resolved *again*. Even worse,
        this does not apply vice-versa, so essentially the order in which I
        list the variables in my for loop becomes part of a public API. Not to
        mention that from a usability PoV, this is just plain horrible.
      
      * Typos in variable names are not catched - for any sensible parser, one
        would expect `${asdf}` to raise an error ("unknown variable" or
        something) - here, such occurences are totally fine.
      
      An alternative (and way easier) approach would be to just let a line be
      resolved by a shell (e.g. with a simple `sh -c 'echo "..."'`). But this
      would essentially add full support for shell expressions in repkg rule
      files, so this is not a sustainable option.
      913a5f0b
  13. 22 Aug, 2018 1 commit
  14. 15 Aug, 2018 1 commit
    • Tinu Weber's avatar
      repkg: Add rudimentary support for "variables" · 6d42a4cb
      Tinu Weber authored
      Replaces all occurrences of ${pkgname}, ${pkgver}, ${pkgrel},
      ${pkgrel++} and ${pkgrel--} by the package name, version, release,
      release+1 and release-1, respectively.
      
      It's rudimendary in that the way this is recognised doesn't scale well
      (it's a hardcoded list of patterns/variables), and it doesn't provide
      any mechanisms for escaping that sequence (i.e. if one *literally* needs
      to put e.g. `${pkgname}`, there is no way to do so currently.
      6d42a4cb
  15. 13 Aug, 2018 2 commits
  16. 10 Aug, 2018 1 commit