"Paul Wise" <p...@debian.org> writes: > On Mon, Jan 19, 2009 at 5:40 PM, Ben Finney <ben+deb...@benfinney.id.au> > wrote: > > >> usually you would remember because you'd debdiff and interdiff > >> against the .deb and .diff.gz in the archive. > > > > How will those help me to get information about the package I'm > > about to build *before* issuing the commands to build it? > > As a sponsor, usually I would do stuff like this: > > dget http://mentors.....foo...-3.dsc
My question was relating to building the source package in the first place; i.e. to invoke ‘dpkg-genchanges’ with the appropriate ‘-v’ argument when building it. Hence, no ‘foo.dsc’ file exists yet at that point. It looks like ‘rmadison’ is the key to what I want to do. Here's a first cut at getting the appropriate ‘-v’ option automatically: ===== $HOME/.devscripts ===== # Get the latest version of current package in Debian archives latest_debian_version=$(dlatest) # Options to pass to dpkg-buildpackage genchanges_opts="-v${latest_debian_version}" DEBUILD_DPKG_BUILDPACKAGE_OPTS="${diff_ignore_opts} ${tar_ignore_opts} ${genchanges_opts}" ===== ===== $HOME/bin/dlatest ===== set -o errexit packagename=$(parsechangelog | grep '^Source:' | cut -d' ' -f 2) suitename=$(parsechangelog | grep '^Distribution:' | cut -d' ' -f 2) latest_debian_version=$(rmadison --suite ${suitename} ${packagename} \ | cut -d'|' -f 2 | sed -e 's/^[[:space:]]+//') echo "${latest_debian_version}" ===== -- \ “If we have to give up either religion or education, we should | `\ give up education.” —William Jennings Bryan, 1923-01 | _o__) | Ben Finney -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org