mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-25 11:42:12 +01:00
- fixed #458083 (importsrcpkg: set the url in the package meta)
This commit is contained in:
parent
f0c19c23be
commit
d2f7dd1de1
@ -2356,11 +2356,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
else:
|
||||
project = store_read_project(project_dir)
|
||||
|
||||
rpm_data = data_from_rpm(srpm, 'Name:', 'Summary:', '%description')
|
||||
rpm_data = data_from_rpm(srpm, 'Name:', 'Summary:', '%description', 'Url:')
|
||||
if rpm_data:
|
||||
title, pac, descr = ( v for k, v in rpm_data.iteritems() )
|
||||
title, pac, descr, url = ( v for k, v in rpm_data.iteritems() )
|
||||
else:
|
||||
title = pac = descr = ''
|
||||
title = pac = descr = url = ''
|
||||
|
||||
if opts.title:
|
||||
title = opts.title
|
||||
@ -2394,6 +2394,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
data = ET.fromstring(''.join(data))
|
||||
data.find('title').text = title
|
||||
data.find('description').text = ''.join(descr)
|
||||
data.find('url').text = url
|
||||
data = ET.tostring(data)
|
||||
else:
|
||||
print >>sys.stderr, 'error - cannot get meta data'
|
||||
|
@ -3203,7 +3203,8 @@ def tag_to_rpmpy(tag):
|
||||
import rpm
|
||||
tags = { 'Name:' : rpm.RPMTAG_NAME,
|
||||
'Summary:' : rpm.RPMTAG_SUMMARY,
|
||||
'%description' : rpm.RPMTAG_DESCRIPTION
|
||||
'%description' : rpm.RPMTAG_DESCRIPTION,
|
||||
'Url:' : rpm.RPMTAG_URL
|
||||
}
|
||||
if tag in tags.keys():
|
||||
return tags[tag]
|
||||
|
Loading…
x
Reference in New Issue
Block a user