Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 880583 Details for
Bug 903068
packages in spacewalk are allways for "apt-get upgrade"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
possible fix for bug 903068
fix_bug903068.patch (text/plain), 6.26 KB, created by
Carsten Menzel
on 2014-03-31 07:37:17 UTC
(
hide
)
Description:
possible fix for bug 903068
Filename:
MIME Type:
Creator:
Carsten Menzel
Created:
2014-03-31 07:37:17 UTC
Size:
6.26 KB
patch
obsolete
>diff --git a/backend/common/rhn_deb.py b/backend/common/rhn_deb.py >index 4dd78d5..36af18b 100644 >--- a/backend/common/rhn_deb.py >+++ b/backend/common/rhn_deb.py >@@ -57,7 +57,12 @@ class deb_Header: > for hdr_k, deb_k in [('requires', 'Depends'), > ('provides', 'Provides'), > ('conflicts', 'Conflicts'), >- ('obsoletes', 'Replaces')]: >+ ('obsoletes', 'Replaces'), >+ ('recommends', 'Recommends'), >+ ('suggests', 'Suggests'), >+ ('enhances', 'Breaks'), >+ ('supplements', 'Pre-Depends'), >+ ('payload_size', 'Installed-Size')]: > if debcontrol.has_key(deb_k): > self.hdr[hdr_k] = debcontrol.get_as_string(deb_k) > for k in debcontrol.keys(): >diff --git a/backend/server/importlib/debPackage.py b/backend/server/importlib/debPackage.py >index b799e3b..05eb509 100644 >--- a/backend/server/importlib/debPackage.py >+++ b/backend/server/importlib/debPackage.py >@@ -122,6 +122,10 @@ class debBinaryPackage(headerSource.rpmBinaryPackage): > 'requires' : headerSource.rpmRequires, > 'conflicts' : headerSource.rpmConflicts, > 'obsoletes' : headerSource.rpmObsoletes, >+ 'suggests' : headerSource.rpmSuggests, >+ 'recommends': headerSource.rpmRecommends, >+ 'enhances' : headerSource.rpmEnhances, >+ 'supplements' : headerSource.rpmSupplements, > } > for k, dclass in mapping.items(): > l = [] >@@ -129,14 +133,15 @@ class debBinaryPackage(headerSource.rpmBinaryPackage): > if values != None: > val = string.join(values.split(), "") # remove whitespaces > val = val.split(',') # split packages >+ i = 0 > for v in val: > version = '' > if '|' in v: > # TODO: store alternative-package-names semantically someday >- name = v >+ name = v + '_' + str(i) > else: > nv = v.split('(') >- name = nv[0] >+ name = nv[0] + '_' + str(i) > # TODO FIX VERSION AND FLAGS > if (len(nv) > 1): > version = nv[1].rstrip(')') >@@ -144,6 +149,7 @@ class debBinaryPackage(headerSource.rpmBinaryPackage): > finst = dclass() > finst.populate(hash) > l.append(finst) >+ i += 1 > self[k] = l > > def _populateChangeLog(self, header): >diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java >index 96cf1e9..7982b80 100644 >--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java >+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java >@@ -93,9 +93,12 @@ public class DebPackageWriter { > out.write(pkgDto.getVendor()); > out.newLine(); > >- out.write("Installed-Size: "); >- out.write(pkgDto.getPackageSize().toString()); >- out.newLine(); >+ Long packagePayloadSize = pkgDto.getPayloadSize(); >+ if (packagePayloadSize > 0 ) { >+ out.write("Installed-Size: "); >+ out.write(pkgDto.getPayloadSize().toString()); >+ out.newLine(); >+ } > > // dependencies > addPackageDepData( >@@ -114,6 +117,22 @@ public class DebPackageWriter { > out, > TaskConstants.TASK_QUERY_REPOMD_GENERATOR_CAPABILITY_OBSOLETES, > pkgDto.getId(), "Replaces"); >+ addPackageDepData( >+ out, >+ TaskConstants.TASK_QUERY_REPOMD_GENERATOR_CAPABILITY_SUGGESTS, >+ pkgDto.getId(), "Suggests"); >+ addPackageDepData( >+ out, >+ TaskConstants.TASK_QUERY_REPOMD_GENERATOR_CAPABILITY_RECOMMENDS, >+ pkgDto.getId(), "Recommends"); >+ addPackageDepData( >+ out, >+ TaskConstants.TASK_QUERY_REPOMD_GENERATOR_CAPABILITY_SUPPLEMENTS, >+ pkgDto.getId(), "Pre-Depends"); >+ addPackageDepData( >+ out, >+ TaskConstants.TASK_QUERY_REPOMD_GENERATOR_CAPABILITY_ENHANCES, >+ pkgDto.getId(), "Breaks"); > > out.write("Filename: XMLRPC/GET-REQ/" + channelLabel + "/getPackage/" + > pkgDto.getName() + "-" + pkgDto.getVersion() + "-" + >@@ -186,22 +205,30 @@ public class DebPackageWriter { > int count = 0; > Collection<PackageCapabilityDto> capabilities = TaskManager > .getPackageCapabilityDtos(pkgId, query); >+ int icapcount = capabilities.size(); >+ String[] names = new String[icapcount]; >+ String[] versions = new String[icapcount]; > try { > for (PackageCapabilityDto capability : capabilities) { > if (count == 0) { > out.write(dep + ": "); > } >- else { >- out.write(", "); >- } >+ > count++; >- String name = capability.getName(); >- String version = capability.getVersion(); >- out.write(name); >- if (version != null && !version.isEmpty()) { >- out.write(" (" + version + ")"); >+ int iordernumber = Integer.parseInt(capability.getName().substring(capability.getName().indexOf("_") + 1)); >+ names[iordernumber] = capability.getName().substring(0,capability.getName().indexOf("_")); >+ versions[iordernumber] = capability.getVersion(); >+ } >+ >+ for (int iIndex = 0; iIndex < names.length; iIndex++) { >+ if (iIndex != 0) { >+ out.write(", "); >+ } >+ out.write(names[iIndex]); >+ if (versions[iIndex] != null && !versions[iIndex].isEmpty()) { >+ out.write(" (" + versions[iIndex] + ")"); > } >- } >+ } > } > catch (Exception e) { > log.debug("failed to write DEB dependency " + dep + " " + e.toString());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 903068
:
685650
|
880583
|
881636
|
881637