Hello! > Not "external" stuff but stuff from its own source. >
oops, you are right... > > I don't think this is a sane idea, > > I disagree. Using pushd/popd (or "cd -") in scripts is a valid way to > avoid a helper variable to save the previous directory. > > But what I dislike in the aforementioned code snippet is that > $BASH_SOURCE is > > a) used at all and hence the script is not bourne-shell compatible. > b) is used in an unclear way (couldn't find in bash(1) what the > meaning of using an array as scalar should return. From my > experiments, it seems to return its first value.) > > I also disagree that "I don't think this is a sane idea" is RC-level, > not even important. Hence downgrading to "normal. > right also here > > specially because in Debian we don't even use version.sh script to > > fill the dkms.conf file. > > I don't understand what you refer to with "in Debian". Do you mean the > fact that I didn't ship the package's upstream's version.sh? Do you > think I should? I think we shouldn't, because it is used/useful only at build time... > > > Can you please remove the two lines? > > At least not in the way you propsed. Hence removing the tag "patch". > > > this is what we do to test dkms packages: > [...] > > dkms_pkg=$(bash -c ". $dkms_conf; echo \$PACKAGE_NAME" 2>/dev/null) > > dkms_ver=$(bash -c ". $dkms_conf; echo \$PACKAGE_VERSION" 2>/dev/null) > > You could do ". $dkms_conf > /dev/null" > interesting, this works indeed: + dkms_pkg=$(bash -c ". $dkms_conf > /dev/null; echo \$PACKAGE_NAME" 2>/dev/null) + dkms_ver=$(bash -c ". $dkms_conf > /dev/null; echo \$PACKAGE_VERSION" 2>/dev/null) (and uploaded in sid) Honestly, I still think my patch is something sane to do (of course, as Debian specific patch), because of this done in rules file: override_dh_dkms: sed -e 's#`\./version.sh`#$(DEB_VERSION_UPSTREAM)#;s#^PRE_BUILD="\(.*\)"#PRE_BUILD="\1 $(DKMS_CONFIGURE_OPTIONS)"#' dkms.conf > debian/dkms dh_dkms so, in any case, that version.sh is *never* ran in Debian packaging, so the whole pushd/popd are useless in this context. G.