The following fix has been committed to the debian-sid branch. ------------------------------------------------------------ revno: 2109 revision-id: j...@debian.org-20110415105245-rb7mmu3voc7z7vn9 parent: j...@debian.org-20110414102800-zkgx5kcakw0gw39x committer: Julian Andres Klode <j...@debian.org> branch nick: debian-sid timestamp: Fri 2011-04-15 12:52:45 +0200 message: * apt-pkg/policy.cc: - Allow pinning by glob() expressions, and regular expressions surrounded by slashes (the "/" character). diff: === modified file 'apt-pkg/policy.cc' --- apt-pkg/policy.cc 2011-03-08 18:32:35 +0000 +++ apt-pkg/policy.cc 2011-04-15 10:52:45 +0000 @@ -216,6 +216,21 @@ P->Data = Data; return; } + + // Allow pinning by wildcards + // TODO: Maybe we should always prefer specific pins over non- + // specific ones. + if (Name.find("*") != string::npos || Name.find("[") != string::npos + || Name.find("?") != string::npos || Name[0] == '/') { + pkgVersionMatch match(Data, Type); + for (pkgCache::PkgIterator P = Cache->PkgBegin(); + P != Cache->PkgEnd(); P++) { + if (match.ExpressionMatches(Name, P.Name())) { + CreatePin(Type, P.Name(), Data, Priority); + } + } + return; + } // Get a spot to put the pin pkgCache::GrpIterator Grp = Cache->FindGrp(Name);
** Changed in: apt (Ubuntu) Status: Confirmed => In Progress ** Changed in: apt (Ubuntu) Assignee: (unassigned) => Julian Andres Klode (juliank) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/399474 Title: RFE: include support for partial wildcard to pin packages -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs