예제 #1
0
파일: pspec.py 프로젝트: hknyldz/pisitools
    def add_conflicts(self, conflicts):
        # special case of given one conflict package
        # with conflict versioning info [**kw, name]
        # [{"versionFrom":"0.4.2"}, "udev"]
        if type(conflicts[0]) == dict:
            conf = Conflict()
            (kw, conf.package) = conflicts
            conf.__dict__[list(kw.keys())[0]] = list(kw.values())[0]
            self.package.conflicts.append(conf)
            return

        for con in conflicts:
            conflict = Conflict()
            conflict.package = con
            self.package.conflicts.append(conflict)
예제 #2
0
파일: pspec.py 프로젝트: hknyldz/pisitools
    def set_package(self, dependencies, conflicts):
        self.package.name = self.name

        if dependencies:
            for depname in dependencies:
                dep = Dependency()
                dep.package = depname
                self.package.packageDependencies.append(dep)

        if conflicts:
            for package in conflicts:
                conflict = Conflict()
                conflict.package = package
                self.package.conflicts.append(conflict)

        self.pspec.packages.append(self.package)