From 159f01de263d13d563e2caab646ee8f744ae6cd3 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 24 Nov 2016 20:17:25 -0500 Subject: Properly handle .buildinfo files. --- mini-dinstall | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mini-dinstall') diff --git a/mini-dinstall b/mini-dinstall index bae0bda..b7617f7 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -37,6 +37,7 @@ import minidinstall.tweet debchanges_re = re.compile('([-a-z0-9+.]+)_(.+?)_([-a-zA-Z0-9]+)\.changes$') debpackage_re = re.compile('([-a-z0-9+.]+)_(.+?)_([-a-zA-Z0-9]+)\.u?deb$') +debbuildinfo_re = re.compile('([-a-z0-9+.]+)_(.+?)_([-a-zA-Z0-9]+)\.buildinfo$') debsrc_dsc_re = re.compile('([-a-z0-9+.]+)_(.+?)\.dsc$') debsrc_diff_re = re.compile('([-a-z0-9+.]+)_(.+?)\.diff\.gz$') debsrc_orig_re = re.compile('([-a-z0-9+.]+)_(.+?)\.orig[-a-z0-9]*\.tar\.(gz|bz2|lzma|xz)$') @@ -891,6 +892,14 @@ class ArchiveDir: is_sourceful = 0 for file in map(lambda x: x[2], changefile.getFiles()): match = debpackage_re.search(file) + if match: + arch = match.group(3) + if not arch in self._arches: + raise DinstallException("Unknown architecture: %s" % (arch)) + target = self._arch_target(arch, file) + newfiles.append((os.path.join(incomingdir, file), target, match.group(1), arch)) + continue + match = debbuildinfo_re.search(file) if match: arch = match.group(3) if not arch in self._arches: @@ -938,7 +947,7 @@ class ArchiveDir: continue self._logger.debug('Scanning for old files') for file in self._read_arch_dir(arch): - match = debpackage_re.search(file) + match = debpackage_re.search(file) or debbuildinfo_re.search(file) if not match: continue oldpkgname = match.group(1) -- cgit v1.2.3