Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1777053

Summary: "gio info" always returns standard::content-type "text/plain" for empty files, regardless the filename suffix
Product: Red Hat Enterprise Linux 8 Reporter: Carlos Santos <casantos>
Component: glib2Assignee: Michael Catanzaro <mcatanza>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.1CC: jkoten, oholy, tpelka, tpopela, walters
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-19 14:42:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos Santos 2019-11-26 20:15:53 UTC
Description of problem:

"gio info" always returns standard::content-type "text/plain" for empty files,
regardless the filename suffix.

Version-Release number of selected component (if applicable):

$ rpm -qf $(which gio)
glib2-2.56.4-7.el8.x86_64

How reproducible:

Always

Steps to Reproduce:
1. : > test1.tex
2. echo 'Mary had a little lamb.' > test2.tex
3. gio info test?.tex | fgrep standard::content-type

Actual results:

  standard::content-type: text/plain
  standard::content-type: application/x-tex

Expected results:

  standard::content-type: text/x-tex
  standard::content-type: text/x-tex

Additional info:

The results are a regression, compared to RHEL-6:

[user@rhel-6-1 02502992]$ : > test1.tex
[user@rhel-6-1 02502992]$ echo 'Mary had a little lamb.' > test2.tex
[user@rhel-6-1 02502992]$ gvfs-info test?.tex | fgrep standard::content-type
  standard::content-type: text/x-tex
  standard::content-type: text/x-tex

The same error happens on RHEL-7, in which gvfs-info is a wrapper around gio:

 [user@rhel-7-3 02502992]$ gvfs-info test?.tex | fgrep standard::content-type
This tool has been deprecated, use 'gio info' instead.
See 'gio help info' for more info.

  standard::content-type: text/plain
  standard::content-type: application/x-tex
[user@rhel-7-3 02502992]$ gio info test?.tex | fgrep standard::content-type
  standard::content-type: text/plain
  standard::content-type: application/x-tex

Comment 7 RHEL Program Management 2020-08-19 14:42:14 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.